package com.tanhua.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanhua.model.domain.AnalysisByDay;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;

/**
 * @author げっしょく
 * @date 2021/11/5
 */
public interface AnalysisByDayMapper extends BaseMapper<AnalysisByDay> {

    @Select("SELECT SUM(num_active) FROM tb_analysis_by_day WHERE record_date BETWEEN #{time} AND #{plus};")
    Integer getMonths(@Param("time") LocalDate time, @Param("plus") LocalDate plus);
}
